<?php 
use Yii\helpers\Html;
use yii\bootstrap\Nav;


//菜单

$menuItem = [];
if ($access = Yii::$app->params['access']) {
    //isset($access['SYSTEM']['USER']) && $menuItem[] = ['label' => '用户信息设置', 'url' => ['/system/user']];
    isset($access['SYSTEM']['USERREG']) && $menuItem[] = ['label' => '注册', 'url' => ['/system/userreg']];
    isset($access['SYSTEM']['USERLOGIN']) && $menuItem[] = ['label' => '登陆', 'url' => ['/system/userlogin']];
    isset($access['SYSTEM']['USERAVATAR']) && $menuItem[] = ['label' => '默认头像', 'url' => ['/system/useravatar']];
} else {
    $menuItem = [
        //['label' => '用户信息设置', 'url' => ['/system/user']],
        ['label' => '注册', 'url' => ['/system/userreg']],
        ['label' => '登陆', 'url' => ['/system/userlogin']],
        ['label' => '默认头像', 'url' => ['/system/useravatar']],
    ];
}


echo Nav::widget([
    'options' => ['class' => 'nav nav-tabs mbm'],
    'items' => $menuItem,
]);

?>